home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / valuator.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  3.9 KB  |  106 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. typedef struct {
  22.     panel base;
  23.     int flags;
  24.     rectangle clamp;    /* display coordinate system clamps on hit input */
  25.     rectangle world;    /* world coordinate system for xVal and yVal */
  26.     int *xVal, *yVal;    /* address of x and y Values, to be read and stuffed */
  27.     Object tracker;
  28. } valuator;
  29.  
  30. typedef struct {
  31.     panel base;
  32.     int flags;
  33.     rectangle clamp;    /* display coordinate system clamps on hit input */
  34.     rectanglef world;    /* world coordinate system for xVal and yVal */
  35.     Coord *xVal, *yVal;    /* address of x and y Values, to be read and stuffed */
  36.     Object tracker;
  37. } valuatorf;
  38.  
  39. typedef struct {
  40.     panel base;
  41.     int flags;
  42.     rectangle clamp;    /* display coordinate system clamps on hit input */
  43.     rectangle world;    /* world coordinate system for delta x and y values */
  44.     int *xVal, *yVal;    /* address of x and y Values, to be read and stuffed */
  45.     rectangle limits;    /* world coordinate limits for xVal and yVal */
  46. } valdelta;
  47.  
  48. typedef struct {
  49.     panel base;
  50.     int flags;
  51.     rectangle clamp;    /* display coordinate system clamps on hit input */
  52.     rectanglef world;    /* world coordinate system for delta x and y values */
  53.     Coord *xVal, *yVal;    /* address of x and y Values, to be read and stuffed */
  54.     rectanglef limits;    /* world coordinate limits for xVal and yVal */
  55. } valdeltaf;
  56.  
  57. typedef struct {
  58.     panel base;
  59.     int flags;
  60.     rectangle clamp;    /* display coordinate system clamps on hit input */
  61.     rectangle world;    /* world coordinate system for x and y values */
  62.     point2d val;    /* current x and y value */
  63.     inst *receiver;    /* object to receive valuator coord update message */
  64.     int selector;    /* application's message to receive updating point */
  65.     int reset;        /* AUTORESET or NOAUTORESET to origin on pen up */
  66.     Object tracker;
  67. } valmesg;
  68.  
  69. typedef struct {
  70.     panel base;
  71.     int flags;
  72.     rectangle clamp;    /* display coordinate system clamps on hit input */
  73.     rectanglef world;    /* world coordinate system for x and y values */
  74.     point2df val;    /* current x and y value */
  75.     inst *receiver;    /* object to receive valuator coord update message */
  76.     int selector;    /* application's message to receive updating point */
  77.     int reset;        /* AUTORESET or NOAUTORESET to origin on pen up */
  78.     Object tracker;
  79. } valmesgf;
  80.  
  81. typedef struct {
  82.     panel base;
  83.     int flags;
  84.     rectangle clamp;    /* display coordinate system clamps on hit input */
  85.     rectangle world;    /* world coordinate system for x and y values */
  86.     Object display;
  87. } valhue;
  88.  
  89. typedef struct {
  90.     panel base;
  91.     int flags;
  92.     rectangle clamp;    /* display coordinate system clamps on hit input */
  93.     rectangle world;    /* world coordinate system for x and y values */
  94.     Object display;
  95. } valval;
  96.  
  97.  
  98. #define MAXHUE        256
  99. #define MAXSAT        256
  100. #define MAXVAL        256
  101.  
  102. #define NOAUTORESET    0
  103. #define AUTORESET    1    /* automatically reset value to 0,0 on pen up */
  104.  
  105. #define CLIPOUT        0x01    /* ignore input points outside clamping range */
  106.